//
//  UseRedenvelopesCell.m
//  NewPro
//
//  Created by RYX on 2019/6/25.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "UseRedenvelopesCell.h"
#import "MyRedenvelopesModel.h"

@implementation UseRedenvelopesCell

+ (instancetype)tempWithTableView:(UITableView *)tableView{
    
    UseRedenvelopesCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CELL"];
    if (!cell) {
        
        ClassName
        cell = [[[NSBundle mainBundle] loadNibNamed:className owner:self options:nil] objectAtIndex:0];
    }
    
    return cell;
}

- (void)setModel:(MyRedenvelopesModel *)model{
    
    self.moneyLa.text = [NSString stringWithFormat:@"%@",model.amount];
    self.nameLa.text = model.name;
    self.desLa.text = model.comment;
    
    NSDateFormatter *allfor = [[NSDateFormatter alloc]init];
    allfor.dateFormat = @"yyyy.MM.dd";
    
    NSDate *Create = [NSDate dateWithTimeIntervalSince1970:[model.createTime integerValue]/1000.0];
    NSDate *End = [NSDate dateWithTimeIntervalSince1970:[model.expireTime integerValue]/1000.0];
    self.timeLa.text = [NSString stringWithFormat:@"限%@-%@使用",[allfor stringFromDate:Create],[allfor stringFromDate:End]];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



@end
